import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.nextLine();
        String maxNumStr = "";
        String currentNumStr = "";
        for (int i = 0; i < s.length(); i++) {
            char c = s.charAt(i);
            if (Character.isDigit(c)) {
                currentNumStr += c;
            } else {
                if (currentNumStr.length() > maxNumStr.length()) {
                    maxNumStr = currentNumStr;
                }
                currentNumStr = "";
            }
        }
        if (currentNumStr.length() > maxNumStr.length()) {
            maxNumStr = currentNumStr;
        }
        System.out.println(maxNumStr);
    }
}
